namespace Hack.Decompiling.PEA.CLR
{
  using System;
  using System.Reflection;
  using System.Reflection.Emit;
  using System.Collections.Generic;
  using System.Text;

  public class ExceptionHandlerSection
  {
    #region Statics
    public static ExceptionHandlerSection it()
    {
      return new ExceptionHandlerSection();
    }
    public static ExceptionHandlerSection of(params ExceptionHandlingClause[] clauses)
    {
      return of(clauses !=null ? new List<ExceptionHandlingClause>(clauses): null);
    }
    public static ExceptionHandlerSection of(IList<ExceptionHandlingClause> clauses)
    {
      return new ExceptionHandlerSection(clauses);
    }
    #endregion
    #region Fields
    protected IList<ExceptionHandlingClause> clauses = null;
    #endregion
    #region Properties
    public virtual IList<ExceptionHandlingClause> Clauses
    {
      get
      {
        return this.clauses == null ?
          this.clauses = new List<ExceptionHandlingClause>() :
          this.clauses;
      }
    }
    #endregion
    #region Constructors
    public ExceptionHandlerSection(params ExceptionHandlingClause[] clauses)
      : this(clauses != null ? new List<ExceptionHandlingClause>(clauses) : null)
    {
    }
    public ExceptionHandlerSection(IList<ExceptionHandlingClause> clauses)
    {
      this.clauses = clauses;
    }
    #endregion
    #region Methods
    #endregion
  }
}
